
<style type="text/css">
div.develop_info_space {
  margin-bottom: 10px;
  width: 100%;
  _text-align: right;
}
div.develop_info_space_lines {
  margin-left: auto;
  width: 97%;
  text-align: left;
  overflow: hidden;
  font-weight: bold;
}
div.develop_info_space_lines_line {
  margin-top: 5px;
  border-bottom: 1px dashed silver;
}
span.diary_date {
  font-size: 10px;
  margin-right: 5px;
}
div.box_space_body span {
  margin-left: 5px;
}
</style>

<div id="summary_container">

<div id="summary_left">

<%
 categories = [ { :name => '不具合', :icon => 'bug' },
                { :name => '要望', :icon => 'table_multiple' },
                { :name => 'お知らせ', :icon => 'exclamation' },
                { :name => 'リリースノート', :icon => 'book_open' },
                { :name => 'ヒント', :icon => 'lightbulb' }
              ]
 %>

<div class="box_space">
  <div class="box_space_title">メニュー</div>
  <div class="box_space_body">
    <% categories.each do |category| -%>
      <% url = url_for(:controller=>'group', :action=>'bbs', :gid=>@group.gid, :category => category[:name]) -%>
      <%= icon_tag category[:icon] -%><span><%= link_to category[:name] + '一覧', url -%></span><br/>
    <% end -%>
  </div>
  <div class="box_space_bottom"></div>
</div><!-- box_space -->

<% if @environment_message %>
<% last_updated = @environment_message.last_updated.strftime("%Y/%m/%d %H:%M") %>
<div class="box_space">
  <div class="box_space_title"><%= icon_tag('server') -%>運用環境</div>
  <div class="box_space_body"><div class="hiki_style"><%= hiki_parse(@environment_message.contents) -%></div>
  </div>
  <div class="box_space_bottom"><%= entry_link_to @environment_message, :view_text => "[#{last_updated}]" -%></div>
</div><!-- box_space -->
<% end %>

<div class="box_space">
  <div class="box_space_title"><%= icon_tag('book_open') -%>リリース履歴</div>
  <div class="box_space_body">
    <ul>
    <% @release_messages.each do |message| %>
      <% view_text = h truncate(message.title, 14) %>
      <li><%= entry_link_to message, :view_text => view_text, :controller => 'group', :action => 'page' -%></li>
    <% end %>
    </ul>
  </div>
  <div class="box_space_bottom"></div>
</div><!-- box_space -->

<div class="box_space">
  <div class="box_space_title"><%= icon_tag('group') -%>開発担当者</div>
  <div class="box_space_body">
    <ul>
    <% @users.each do |user| %>
      <li><%= user_link_to user %></li>
    <% end %>
    </ul>
  </div>
  <div class="box_space_bottom"><%= group_link_to @group, :view_text => '[開発チーム情報へ]' -%></div>
</div><!-- box_space -->

</div><!-- summary_left -->

<style type="text/css">
div.fieldWithErrors {
  width: 100%;
}
div.message_post_space textarea {
  width: 90%;
}
</style>

<div id="summary_right">

  <div class="develop_info_space">
    <div class="topix_title" style="text-align: left;"><%= icon_tag('asterisk_orange') -%><span>不具合・要望受付</span></div>
    <div class="message_post_space" style="border: 1px dashed silver; margin-top: 5px; margin-bottom: 10px; padding: 5px 10px; text-align: left;">
      <% form_tag :action => 'create_message' do -%>

      <p><label for="entry_title">件名：</label><br/>
        <%= text_field 'entry', 'title' %>
        <%= radio_button('entry', "category", "不具合") -%>不具合
        <%= radio_button('entry', "category", "要望") -%>要望
        <%= radio_button('entry', "category", "問合せ,連絡") -%>問合せ
      </p>
      <p><label for="group_desc">内容：</label><br/>
        <%= text_area 'entry', 'contents', :cols => 70, :rows => 5 %></p>

      <div style="margin-top: 5px;"><%= submit_tag '投稿' %><%= "(タイトル・内容の両方が必須です)" unless @entry.errors.empty? -%></div>
      <% end %>
    </div>
  </div><!-- develop_info_space -->

  <div class="develop_info_space">
    <div class="topix_title" style="text-align: left;"><%= icon_tag('asterisk_orange') -%><span>お知らせ</span></div>
    <div class="develop_info_space_lines">
      <% @info_messages.each do |message| -%>
        <% view_text = icon_tag('bullet_red') + "<span class='diary_date'>[" + message.diary_date + "]</span>" + h(message.title) %>
      <div class="develop_info_space_lines_line"><%= entry_link_to message, :view_text => view_text, :controller => 'group', :action => 'page' -%></div>
      <% end %>
    </div>
  </div><!-- develop_info_space -->

  <div class="develop_info_space">
    <div class="topix_title" style="text-align: left;"><%= icon_tag('asterisk_orange') -%><span>リリースノート</span></div>
    <div class="develop_info_space_lines">
      <% @release_messages.each do |message| -%>
        <% view_text = icon_tag('bullet_blue') + "<span class='diary_date'>[" + message.diary_date + "]</span>" + h(message.title) %>
      <div class="develop_info_space_lines_line"><%= entry_link_to message, :view_text => view_text, :controller => 'group', :action => 'page' -%></div>
      <% end %>
    </div>
  </div><!-- develop_info_space -->

  <div class="develop_info_space">
    <div class="topix_title" style="text-align: left;"><%= icon_tag('asterisk_orange') -%><span>利用上のヒント</span></div>
    <div class="develop_info_space_lines">
      <% @hint_messages.each do |message| -%>
        <% view_text = icon_tag('bullet_green') + "<span class='diary_date'>[" + message.diary_date + "]</span>" + h(message.title) %>
      <div class="develop_info_space_lines_line"><%= entry_link_to message, :view_text => view_text, :controller => 'group', :action => 'page' -%></div>
      <% end %>
    </div>
  </div><!-- develop_info_space -->

</div><!-- summary_right -->

<div id="summary_bottom">
</div><!-- summary_bottom -->

</div><!-- summary_container -->
